<%@ page contentType="text/html;charset=ISO-8859-1"%>
<div id="addTimeTracker">

	<g:flashMessage/>
	<g:hasErrors bean="${timeTrackerInstance}">
		<ul class="errors" role="alert">
			<g:eachError bean="${timeTrackerInstance}" var="error">
				<li
					<g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
						error="${error}" /></li>
			</g:eachError>
		</ul>
	</g:hasErrors>

	<g:form controller="timeTracker" action="addTimeTrackerEvent">
		<fieldset class="form">
			<div
				class="fieldcontain ${hasErrors(bean: timeTrackerInstance, field: 'dateOfWork', 'error')} required">
				<label for="dateOfWork"> <g:message
						code="timeTracker.dateOfWork.label" default="Date Of Work" /> <span
					class="required-indicator">*</span>
				</label>
				<g:datePicker name="dateOfWork" precision="day"
					value="${timeTrackerInstance?.dateOfWork}" />
			</div>

			<div
				class="fieldcontain ${hasErrors(bean: timeTrackerInstance, field: 'hours', 'error')} required">
				<label for="hours"> <g:message
						code="timeTracker.hours.label" default="Hours" /> <span
					class="required-indicator">*</span>
				</label>
				<g:field type="number" name="hours" step="0.01" min="0.25"
					max="10.0" required=""
					value="${fieldValue(bean: timeTrackerInstance, field: 'hours')}" />
			</div>

			<div
				class="fieldcontain ${hasErrors(bean: timeTrackerInstance, field: 'comments', 'error')} ">
				<label for="comments"> <g:message
						code="timeTracker.comments.label" default="Comments" />

				</label>
				<g:textArea name="comments" cols="40" rows="5" maxlength="2000"
					value="${timeTrackerInstance?.comments}" />
			</div>
		</fieldset>
		<g:remoteLink controller="timeTracker" action="addTimeTrackerEvent" update="addTimeTracker">add</g:remoteLink>
	</g:form>
</div>